package com.woniuxy.service.mapper;

import com.woniuxy.commons.entity.Order;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface OrderMapper {
    public List<Order> all();
    public int turn(@Param("orderId")int orderId,@Param("escortId")int escortId);
    public int close(int orderId);
    public List<Order> disabled(int disabledId);
    public List<Order> escort(int escortId);
    public int accept(int orderId);
    public int refuse(int orderId);
    public int closebydisabled(int orderId);
    public List<Order> findbydisabled(@Param("key") String key,@Param("disabledId") int disabledId);
    public List<Order> findbyescortId(@Param("key") String key,@Param("escortId") int escortId);
    public int add(Order order);
    public Order findbyid(int orderId);
    public int pay(int orderId);
    //数据库字段为no
    public int paybyno(String orderNo);
    public int setorderno(@Param("orderNo") String orderNo,@Param("orderId")int orderId);
    public int revisit(int orderId);
    public void review(@Param("review") String review,@Param("orderId") int orderId);

    //筛选方法2
    public List<Order> findbynoandnameandescortandstatus(@Param("no")String no,@Param("name")String name,@Param("escort")String escort,@Param("status")int status);
    public List<Order> findbynoandnameandstatus(@Param("no")String no,@Param("name")String name,@Param("status")int status);
    public List<Order> findbynoandescortandstatus(@Param("no")String no,@Param("escort")String escort,@Param("status")int status);
    public List<Order> findbynoandstatus(@Param("no")String no,@Param("status")int status);
    public List<Order> findbynoandnameandescort(@Param("no")String no,@Param("name")String name,@Param("escort")String escort);
    public List<Order> findbynoandname(@Param("no")String no,@Param("name")String name);
    public List<Order> findbynoandescort(@Param("no")String no,@Param("escort")String escort);
    public List<Order> findbyno(String no);
    public List<Order> findbynameandescortandstatus(@Param("name")String name,@Param("escort")String escort,@Param("status")int status);
    public List<Order> findbyescortandstatus(@Param("escort")String escort,@Param("status")int status);
    public List<Order> findbynameandstatus(@Param("name")String name,@Param("status")int status);
    public List<Order> findbystatus(int status);
    public List<Order> findbynameandescort(@Param("name")String name,@Param("escort")String escort);
    public List<Order> findbyescort(String escort);
    public List<Order> findbyname(String name);






}
